Method and device for information interaction

ABSTRACT

A method for information interaction includes: when an access request sent by a webpage to a preset domain name is received by a browser component, resolving the preset domain name into a designated access address, the access request being sent by the webpage when the webpage is required to interact with an operating system of a terminal, and the designated access address being an access address that has not been occupied; sending the access request to the designated access address as a destination address; and when a firewall detects that the destination address of the access request is the designated access address, redirecting the access request to a local web service, the local web service being configured for information interaction with the operating system of the terminal.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to Chinese patent application No.201810264876.5, filed on Mar. 28, 2018, the disclosure of which ishereby incorporated by reference in its entirety.

BACKGROUND

With the development of the Internet, webpages carry more and morefunctions. For some functions, the webpage is required to be interactivewith the operating system of the terminal, for example, starting acamera of the terminal.

SUMMARY

The present disclosure relates to the technical field of networks, andin particular, to a method and a device for information interaction.

In an aspect, there is provided a method for information interaction,including:

when an access request sent by a webpage to a preset domain name isreceived by a browser component, resolving the preset domain name into adesignated access address, the access request being sent by the webpagewhen the webpage is required to interact with an operating system of aterminal, and the designated access address being an access address thathas not been occupied;

sending the access request to the designated access address as adestination address;

when a firewall detects that the destination address of the accessrequest is the designated access address, redirecting the access requestto a local web service, the local web service being configured forinformation interaction with the operating system of the terminal; and

based on the information interaction between the local web service andthe operating system of the terminal, responding to the access requestand returning a response message.

In some embodiments, resolving the preset domain name into thedesignated access address includes:

invoking a domain name resolution interface of the operating system ofthe terminal by the browser component, the domain name resolutioninterface having a domain name filtering function; and

resolving the preset domain name into the designated access addressbased on the domain name filtering function.

In some embodiments, redirecting the access request to the local webservice of the operating system of the terminal includes:

converting the destination address of the access request into a local IPaddress and a local port number according to an address filtering ruleof the firewall, the local IP address and the local port number pointingto the local webpage service; and

forwarding the access request with the converted destination address tothe local webpage service.

In some embodiments, after responding to the access request andreturning a response message, the method further includes: when thefirewall detects that a source address of the response message is alocal IP address and a local port number, redirecting the responsemessage to the webpage; and

both of the local IP address and the local port number point to thelocal web service.

In some embodiments, redirecting the response message to the webpageincludes:

changing the source address of the response message to the designatedaccess address according to an address filtering rule of the firewall;and

forwarding the response message with the changed source address to thewebpage.

In another aspect, there is provided a method for informationinteraction, which is applied in a browser component. The methodincludes:

when receiving an access request sent by a webpage to a preset domainname, resolving the preset domain name into a designated access address,the access request being sent by the webpage when the webpage isrequired to interact with an operating system of a terminal, and thedesignated access address being an access address that has not beenoccupied; and

sending the access request to the designated access address as adestination address, wherein the access request is subject to addressfiltering detection by a firewall, and the firewall is configured to:when the firewall detects that the destination address of the accessrequest is the designated access address, redirect the access request toa local web service for information interaction with the operatingsystem of the terminal, respond to the access request and return aresponse message.

In some embodiments, resolving the preset domain name into thedesignated access address includes:

invoking a domain name resolution interface of the operating system ofthe terminal, the domain name resolution interface having a domain namefiltering function; and

resolving the preset domain name into the designated access addressbased on the domain name filtering function.

In another aspect, there is provided a device for informationinteraction, including:

a domain-name resolving module configured to, when an access requestsent by a webpage to a preset domain name is received by a browsercomponent, resolve the preset domain name into a designated accessaddress, the access request being sent by the webpage when the webpageis required to interact with an operating system of a terminal, and thedesignated access address being an access address that has not beenoccupied;

a sending module configured to send the access request to the designatedaccess address as the destination address;

a first redirecting module configured to, when a firewall detects thatthe destination address of the access request is the designated accessaddress, redirect the access request to a local web service, the localweb service being configured for information interaction with theoperating system of the terminal; and

a responding module configured to, based on the information interactionbetween the local web service and the operating system of the terminal,respond to the access request and return a response message.

In some embodiments, the domain-name resolving module is configured toinvoke a domain name resolution interface of the operating system of theterminal by the browser component, the domain name resolution interfacehaving a domain name filtering function; and resolve the preset domainname into the designated access address based on the domain namefiltering function.

In some embodiments, the first redirecting module is configured toconvert the destination address of the access request into a local IPaddress and a local port number according to an address filtering ruleof the firewall, the local IP address and the local port number pointingto the local web service; and forward the access request with theconverted destination address to the local web service.

In some embodiments, the device further includes:

a second redirecting module configured to, when the firewall detectsthat a source address of the response message is a local IP address anda local port number, redirect the response message to the webpage;

wherein both of the local IP address and the local port number point tothe local web service.

In some embodiments, the second redirecting module is configured tochange the source address of the response message to the designatedaccess address according to an address filtering rule of the firewall;and forward the response message with the changed source address to thewebpage.

In another aspect, there is provided a device for informationinteraction, including:

a domain-name resolving module configured to, when receiving an accessrequest sent by a webpage to a preset domain name, resolve the presetdomain name into a designated access address, the access request beingsent by the webpage when the webpage is required to interact with anoperating system of a terminal, and the designated access address beingan access address that has not been occupied; and

a sending module configured to send the access request to the designatedaccess address as the destination address, wherein the access request issubject to address filtering detection by a firewall, and the firewallis configured to: when the firewall detects that the destination addressof the access request is the designated access address, redirect theaccess request to a local web service for information interaction withthe operating system of the terminal, respond to the access request andreturn a response message.

In some embodiments, the domain-name resolving module is configured toinvoke a domain name resolution interface of the operating system of theterminal, the domain name resolution interface having a domain namefiltering function; and

resolve the preset domain name into the designated access address basedon the domain name filtering function.

In another aspect, there is provided a device for informationinteraction, including:

a processor; and

a memory for storing instructions executable by the processor,

wherein the processor is configured to: when an access request sent by awebpage to a preset domain name is received by a browser component,resolve the preset domain name into a designated access address, theaccess request being sent by the webpage when the webpage is required tointeract with an operating system of a terminal, and the designatedaccess address being an access address that has not been occupied; sendthe access request to the designated access address as the destinationaddress; when a firewall detects that the destination address of theaccess request is the designated access address, redirect the accessrequest to a local web service, the local web service being configuredfor information interaction with the operating system of the terminal;and based on the interaction between the local web service and theoperating system of the terminal, respond to the access request andreturn a response message.

In another aspect, there is provided a device for informationinteraction, including:

a processor; and

a memory for storing instructions executable by the processor,

wherein the processor is configured to: when receiving an access requestsent by a webpage to a preset domain name, resolve the preset domainname into a designated access address, the access request being sent bythe webpage when the webpage is required to interact with an operatingsystem of a terminal, and the designated access address being an accessaddress that has not been occupied; and send the access request to thedesignated access address as the destination address, wherein the accessrequest is subject to address filtering detection by a firewall, and thefirewall is configured to: when the firewall detects that thedestination address of the access request is the designated accessaddress, redirect the access request to a local web service forinformation interaction with the operating system of the terminal,respond to the access request and return a response message.

In another aspect, a mobile terminal is provided including the devicedescribed above, and further including a microphone and a speaker.

In some embodiments, the mobile terminal is a mobile phone.

In some embodiments, the processor is a general-purpose processor, suchas central processing unit (CPU) of the mobile phone, which isconfigured to not only realize the methods described above but also runprograms or applications (Apps) on the mobile phone, such as browsing,gaming, video/textual/voice communications, etc.

In some other embodiments, the processor is an ASIC described above.

A non-transitory computer readable storage medium is provided, havingstored thereon instructions that, when being executed by a processor,cause the processor to: when receiving an access request sent by awebpage to a preset domain name, resolving the preset domain name into adesignated access address, the access request being sent by the webpagewhen the webpage is required to interact with an operating system of aterminal, and the designated access address being an access address thathas not been occupied; and sending the access request with thedesignated access address as a destination address, wherein the accessrequest is subject to address filtering detection by a firewall, and thefirewall is configured to: when the firewall detects that thedestination address of the access request is the designated accessaddress, redirect the access request to a local web service forinformation interaction with the operating system of the terminal,respond to the access request and return a response message.

In some embodiments, the processor is further configured to: invoke adomain name resolution interface of the operating system of theterminal, the domain name resolution interface having a domain namefiltering function; and resolve the preset domain name into thedesignated access address based on the domain name filtering function.

It should be understood that both the foregoing general description andthe following detailed description are exemplary and explanatory onlyand are not restrictive of the disclosure.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of the present disclosure, illustrate embodiments consistent withthe disclosure and, together with the description, serve to explain theprinciples of the disclosure.

FIG. 1A is a flowchart of a method for information interaction accordingto some embodiments.

FIG. 1B is a flowchart of a method for information interaction accordingto some embodiments.

FIG. 2 is a flowchart of a method for information interaction accordingto an exemplary embodiment.

FIG. 3A is a block diagram of a device for information interactionaccording to some embodiments.

FIG. 3B is a block diagram of a device for information interactionaccording to some embodiments.

FIG. 4 is a block diagram of a device 400 for information interactionaccording to some embodiments.

DETAILED DESCRIPTION

In order to make the objects, technical solutions and advantages of thepresent disclosure more apparent, the embodiments of the presentdisclosure will be further described in detail below with reference tothe accompanying drawings.

Reference will now be made in detail to some embodiments, examples ofwhich are illustrated in the accompanying drawings. The followingdescription refers to the accompanying drawings in which the samenumbers in different drawings represent the same or similar elementsunless otherwise represented. The implementations set forth in thefollowing description of some embodiments do not represent allimplementations consistent with the disclosure. Instead, they are merelyexamples of apparatuses and methods consistent with aspects related tothe disclosure as recited in the appended claims.

The inventors of the present application have recognized that in relatedart, the terminal accesses the webpage through a browser or softwareincluding a browser kernel. In order to ensure the security of theoperating system of the terminal and the user privacy, the browser andthe like create an independent execution environment for the webpage, sothat the webpage is isolated from the system of the terminal. In thecase of a generic browser, for example, the webpage and the operatingsystem of the terminal can only interact through a preset interface ofthe browser. However, for functions involving system security and useraccount information, the generic browser does not have a correspondingpreset interface and cannot implement the corresponding function. Toimplement the corresponding function, specific software with thecorresponding preset interface has to be developed based on the browserkernel. Then, when the webpage is accessed through the specificsoftware, the interaction between the webpage and the operating systemof the terminal can be completed and the corresponding functions can berealized.

To overcome the problems in the related art, various embodiments of thepresent disclosure provide a method and a device for informationinteraction.

For example, when an access request sent by a webpage to a preset domainname is received, the preset domain name is resolved into a designatedaccess address that has not been occupied. The access request with adestination address being the designated access address is redirected bya firewall to a local web service which may interact with the operatingsystem of the terminal. Then, the interaction with the operating systemof the terminal is performed by the local web service. Such informationinteraction process can avoid the limitation of the interaction functionbetween the browser or the browser kernel and the operating system,enable interaction between the developed function of the webpage and theoperation system through a generic browser or software based on thebrowser kernel, which can lower the developing cost and have a wideapplicability.

FIG. 1A is a flowchart of a method for information interaction accordingto some embodiments. As shown in FIG. 1A, the method is applied to aterminal, and includes the following steps.

In step 101A, when an access request sent by a webpage to a presetdomain name is received by a browser component, the preset domain nameis resolved into a designated access address.

The access request is sent by the webpage when it is required tointeract with the operating system of the terminal, and the designatedaccess address is an access address that has not been occupied.

In step 102A, the access request is sent to the designated accessaddress as the destination address.

In step 103A, when a firewall detects that the destination address ofthe access request is the designated access address, the access requestis redirected to a local web service which is configured for informationinteraction with the operating system of the terminal.

In step 104A, based on the interaction between the local web service andthe operating system of the terminal, the access request is responded toand a response message is returned.

In the method provided by the embodiment of the present disclosure, whenan access request sent by a webpage to a preset domain name is received,the preset domain name is resolved into a designated access address thathas not been occupied. The access request with a destination addressbeing the designated access address is redirected by a firewall to alocal web service which may interact with the operating system of theterminal. Then, the interaction with the operating system of theterminal is performed by the local web service. Such informationinteraction process can avoid the limitation of the interaction functionbetween the browser or the browser kernel and the operating system,enable interaction between the developed function of the webpage and theoperation system through a generic browser or software based on thebrowser kernel, which can lower the developing cost and have a wideapplicability.

In some embodiments, resolving the preset domain name into a designatedaccess address includes the following steps.

A domain name resolution interface of the operating system of theterminal is invoked by the browser component, and the domain nameresolution interface has a domain name filtering function; and

the preset domain name is resolved into the designated access addressbased on the domain name filtering function.

In some embodiments, redirecting the access request to a local webservice of the operating system of the terminal includes the followingsteps.

The destination address of the access request is converted into a localIP address and a local port number according to an address filteringrule of the firewall, and both of the local IP address and the localport number point to the local webpage service; and

the access request with the converted destination address is forwardedto the local webpage service.

In some embodiments, after the access request is responded to and aresponse message is returned, the method further includes the followingsteps.

When it is detected by the firewall that a source address of theresponse message is the local IP address and the local port number, theresponse message is redirected to the webpage; and

both of the local IP address and the local port number point to thelocal web service.

In some embodiments, redirecting the response message to the webpageincludes:

the source address of the response message is changed to the designatedaccess address according to the address filtering rule of the firewall;and

the response message with the changed source address is forwarded to thewebpage.

All of the above optional technical solutions may be combined to form anoptional embodiment of the present disclosure, and will not be furtherdescribed one by one herein.

FIG. 1B is a flowchart of a method for information interaction accordingto some embodiments. As shown in FIG. 1B, the method is applied to abrowser component, and includes the following steps.

In step 101B, when an access request sent by a webpage to a presetdomain name is received, the preset domain name is resolved into adesignated access address. The access request is sent by the webpagewhen it is required to interact with the operating system of theterminal, and the designated access address is an access address thathas not been occupied.

In step 102B, the access request is sent to the designated accessaddress as the destination address. The access request is subject toaddress filtering detection by a firewall, and the firewall isconfigured to: when it is detected that the destination address of theaccess request is the designated access address, redirect the accessrequest to a local web service for information interaction with theoperating system of the terminal, respond to the access request andreturn a response message.

In the method provided by the embodiment of the present disclosure, whenan access request sent by a webpage to a preset domain name is received,the preset domain name is resolved into a designated access address thathas not been occupied. The designated access address may be redirectedby a firewall to a local web service that may interact with theoperating system of the terminal. Then, the interaction with theoperating system of the terminal is performed by the local web service,and a response message is returned. Such information interaction processcan avoid the limitation of the interaction function between the browseror the browser kernel and the operating system, enable interactionbetween the developed function of the webpage and the operation systemthrough a generic browser or software based on the browser kernel, whichcan lower the developing cost and have a wide applicability.

In some embodiments, resolving the preset domain name into a designatedaccess address includes: invoking a domain name resolution interface ofthe operating system of the terminal, the domain name resolutioninterface having a domain name filtering function; and resolving thepreset domain name into the designated access address based on thedomain name filtering function.

All of the above optional technical solutions may be combined to form anoptional embodiment of the present disclosure, and will not be furtherdescribed one by one herein.

FIG. 2 is a flowchart of a method for information interaction accordingto some embodiments. As shown in FIG. 2, the method is applied in aterminal, and includes the following steps.

In step 201, after a webpage sends an access request to the presetdomain name since it is required to interact with the terminal operatingsystem, and when an access request sent by the webpage to a presetdomain name is received by a browser component, the preset domain nameis resolved into a designated access address.

In some embodiments, the preset domain name is a special domain nameregistered previously. The preset domain name does not point to anywebpage. Since the preset domain name is registered, it is generally notoccupied. For example, the preset domain name may be “abcdefghijk.com,”which is not limited by the embodiment of the present disclosure.

In some embodiments, when a webpage function is developed, for afunction of the webpage that requires interaction with the operatingsystem of the terminal, an access request triggered by the function isdirected to the preset domain name. That is, when the webpage isrequired to interact with the operating system of the terminal, anaccess request pointing to the preset domain name is sent. That is, forany access request sent to the preset domain name, the terminaldetermines it as an access request that requires interaction with theoperating system.

The designated access address may be preset or modified by the system ofthe terminal. In the actual application process, the designated accessaddress may not actually exist, and it may be understood that thedesignated access address is not occupied by any service, application ormachine. The designated access address may be an IP (Internet Protocol)address, or a combination of an IP address and a port number. Forexample, the IP address may be preset to 1.2.4.3 or 255.0.0.0 and thelike, which may not be occupied generally or may be an illegal IPaddress. The port number may be any port number that does not conflictwith other services, such as 80, 8080, etc. When the designated accessaddress is a combination of an IP address and a port number, thedesignated access address may be 1.2.4.3:80, for example, which is notlimited in the embodiment.

In some embodiments, when the terminal triggers an access request in awebpage, the terminal sends the access request through a script js, andthe access request is processed by a browser component of the terminal.For example, the browser component resolves the preset domain namecarried by the access request.

It should be noted that the browser component in this embodiment isconfigured to implement a browsing function for the webpage, and thebrowser component may be included in a generic browser, or may beincluded in software having a browser kernel, which is not limited inthe embodiment of the present disclosure.

In an embodiment of the present disclosure, the process of resolving thepreset domain name into the designated access address includes: invokinga domain name resolution interface of the operating system of theterminal by the browser component, the domain name resolution interfacehaving a domain name filtering function; and resolving the preset domainname into the designated access address based on the domain namefiltering function.

A preset domain name filtering module is provided additionally in thedomain name resolution program of the operating system of the terminal,and the preset domain name filtering module is configured to convert thepreset domain name into the designated access address. The browsercomponent executes the domain name resolution program of the operatingsystem of the terminal by invoking the domain name resolution interface.In an implementation, the preset domain name filtering module stores acorrespondence between the preset domain name and the designated accessaddress. When the domain name resolution program is executed, the presetdomain name filtering module acquires the designated access addresscorresponding to the preset domain name according to the abovecorrespondence, and returns the designated access address to the browsercomponent.

Taking the browser component included in the browser as an example, inthe process of displaying the webpage through the browser, when thewebpage triggers an access request that requires interaction with theoperating system of the terminal, the webpage sends the access requestto the preset domain name abcdefghijk.com through the script js. Thebrowser performs domain name resolution on all access requests sent bythe webpage. When the browser detects that the domain name of the accessrequest is the preset domain name abcdefghijk.com, the browser invokesthe domain name resolution interface of the operating system of theterminal to resolve the preset domain name into the designated accessaddress 1.2.4.3 and return the designated access address 1.2.4.3 as areturn value to the browser.

In step 202, the access request is sent to the designated access addressas the destination address.

When the browser component acquires the designated access address, theaccess request is forwarded to the designated access address as thedestination address. That is, the destination address of the accessrequest is the designated access address. The detailed process ofsending the access request is: acquiring an IP data packet correspondingto the access request, setting the destination address of the IP datapacket to the designated access address; and sending the IP data packetbased on the set destination address.

Taking the browser component included in the browser as an example, whenthe browser acquires the designated access address as 1.2.4.3, the IPdata packet is sent after the destination address of the IP data packetof the access request is set to 1.2.4.3.

In step 203, when a firewall detects that the destination address of theaccess request is the designated access address, the access request isredirected to a local web service.

In some embodiments, the process of redirecting the access request to alocal webpage service includes: converting the destination address ofthe access request to a local IP address and a local port numberaccording to an address filtering rule of the firewall; and forwardingthe access request with the converted destination address to the localwebpage service.

Both of the local IP address and the local port number point to thelocal web service. That is, the local web service may be accessedthrough the local IP address and the local port number.

The local web service is configured to perform information interactionwith the operating system of the terminal. The local web service mayalso be regarded as an HTTP (HyperText Transfer Protocol) serverestablished by the terminal on the local IP and the local port.

The terminal is provided with a firewall, and access requests issued bythe webpage are all passed through the firewall. The firewall isconfigured to forward or intercept the data according to the destinationaddress of the received IP data packet. The firewall is configured withan address filtering rule for the designated access address. Forexample, the address filtering rule may be: converting the destinationaddress of the IP data packet having a destination address as thedesignated access address (such as 1.2.4.3) to the local IP address andthe local port number.

The local IP address and the local port number may be preset or modifiedby the terminal. For example, the local IP address may be 127.0.0.1, andthe local port number may be 8347, the specific content of which is notlimited in the present embodiment of the present disclosure.

For example, when the terminal firewall detects that the destinationaddress of the IP data packet that receives the access request is thedesignated access address 1.2.4.3, according to the address filteringrule configured for the firewall, the local IP address 127.0.0.1 and thelocal port number 8347 corresponding to the designated access addressare acquired. The destination address of the IP data packet is convertedfrom 1.2.4.3 to 127.0.0.1:8347. Afterwards, the IP data packet is sent.Since the converted destination address of the IP data packet points tothe local webpage service, after the conversion of the destinationaddress, the access request of the webpage may be successfully to thelocal webpage service.

In step 204, based on the interaction between the local web service andthe operating system of the terminal, the access request is responded toand a response message is returned.

In some embodiments, after receiving the access request, the localwebpage service resolves the access request, and determines that theaccess request is required to perform an interaction operation with theoperating system of the terminal. The local webpage service performs theinteraction operation, and feeds back the execution result as theresponse message.

The interaction operation may include reading an application list of theoperating system of the terminal, reading local contact information,turning on the camera, turning on the microphone, and other operationthat may be performed only based on the operating system of theterminal. The embodiment of the present disclosure does not limit thetype of the interaction operation.

The local webpage service returns a corresponding execution result fordifferent interaction operations. For example, when the interactionoperation is reading an application list of the operating system, theexecution result is returning a retrieved list of applications. When theinteraction operation is turning on the camera, the execution result isturning on successfully or failure in turning on.

Returning a response message is sending the response message to thewebpage.

In step 205, when the firewall detects that a source address of theresponse message is the local IP address and the local port number, theresponse message is redirected to the webpage.

In some embodiments, the process of redirecting the response message tothe webpage includes: changing a source address of the response messageto the designated access address according to an address filtering ruleof the firewall; and forwarding the response message with the changedsource address to the webpage. The initial source address of theresponse message is the local IP address and the local port number.

The response message sent by the local webpage service is in a form ofan IP data packet, and the IP data packet of the response message alsohas to pass through the firewall. The firewall is configured with anaddress filtering rule for the local webpage service. For example, theaddress filtering rule may be: converting all source addresses of IPdata packets having source addresses as the local IP address (such as127.0.0.1) and the local port number (such as 8347) to the designatedaccess address. The IP data packet with the converted source address issent to the browse component. When the browse component detects that thesource address of the IP data packet is the designated access address,determines that the IP data packet is a response message returned to thewebpage, and forwards the IP data packet to the webpage, specifically tothe script js of the webpage.

For example, when the firewall of the terminal detects that the sourceaddress of the IP data packet of the received response message is thelocal IP address and the local port number 127.0.0.1:8347, according tothe address filtering rule configured for the firewall, the designatedaccess address 1.2.4.3 corresponding to the local IP address 127.0.0.1and the local port number 8427 is acquired. The source address of the IPdata packet is converted from 127.0.0.1:8347 to 1.2.4.3. Afterwards, theIP data packet is sent. The source address of the response message afterthe source address conversion is the designated access address, and whenthe browser identifies that the source address is the designated accessaddress, the browser determines that the response message is informationthat the webpage interacts with the operating system of the terminal,and then returns the response message successfully to the webpage.Thereby, it can realize the interaction between the webpage and theoperating system of the terminal.

It should be noted that the designated access address mentioned abovemay also be replaced by a designated access address and a designatedport number. The designated port number may be set or modified by theterminal. For example, the designated port number may be 80, 5678, etc.,which is not limited by the embodiment of the present disclosure.

In the method provided by the embodiment of the present disclosure, whenan access request sent by a web page to a preset domain name isreceived, the preset domain name is resolved into a designated accessaddress that has not been occupied. The access request with adestination address being the designated access address is redirected bya firewall to a local web service which may interact with the operatingsystem of the terminal. Then, the interaction with the operating systemof the terminal is performed by the local web service. Such informationinteraction process can avoid the limitation of the interaction functionbetween the browser or the browser kernel and the operating system,enable interaction between the developed function of the web page andthe operation system through a generic browser or software based on thebrowser kernel, which can lower the developing cost and have a wideapplicability.

In addition, by registering the preset domain name for the accessrequest of the webpage that is required to perform interaction with theoperating system, it can avoid the domain name resolution confusioncaused by the domain name occupation. By setting the designated accessaddress as a non-existent IP address, it can avoid failure inredirection caused by IP address conflict, and it can improve stabilityand accuracy in information interaction.

In addition, the firewall redirects the source address of the responsemessage returned by the local webpage service, so that the returnedresponse message can be successfully sent to the webpage, and theinformation transmission from the operating system to the webpage can becompleted. In some embodiments, through the address filtering rule ofthe firewall, it can implement bidirectional address redirection of theIP data packet from the webpage to the local webpage service and fromthe local webpage service to the webpage, and by utilizing “disguised”destination address and source address, it can realize two-waycommunication between the webpage and the operating system.

FIG. 3A is a block diagram of a device for information interactionaccording to some embodiments. As shown in FIG. 3A, the device includesa domain-name resolving module 301A, a sending module 302A, a firstredirecting module 303A and a responding module 304A.

The various device components, units, blocks, or portions may havemodular configurations, or are composed of discrete components, butnonetheless may be referred to as “modules” in general. In other words,the “components,” “modules” or “units” referred to herein may or may notbe in modular forms.

The domain-name resolving module 301A is connected to the sending module302A, and configured to, when an access request sent by a webpage to apreset domain name is received by a browser component, resolve thepreset domain name into a designated access address, the access requestbeing sent by the webpage when the webpage is required to interact withan operating system of a terminal, and the designated access addressbeing an access address that has not been occupied. The sending module302A is connected to the first redirecting module 303A and configured tosend the access request to the designated access address as thedestination address. The first redirecting module 303A is connected tothe responding module 304A and configured to, when a firewall detectsthat the destination address of the access request is the designatedaccess address, redirect the access request to a local web service, thelocal web service being configured for information interaction with theoperating system of the terminal. The responding module 304A isconfigured to, based on the interaction between the local web serviceand the operating system of the terminal, respond to the access requestand return a response message.

In some embodiments, the domain-name resolving module is configured toinvoke a domain name resolution interface of the operating system of theterminal by the browser component, the domain name resolution interfacehaving a domain name filtering function; and resolve the preset domainname into the designated access address based on the domain namefiltering function.

In some embodiments, the first redirecting module is configured toconvert the destination address of the access request into a local IPaddress and a local port number according to an address filtering ruleof the firewall, the local IP address and the local port number pointingto the local webpage service; and forward the access request with theconverted destination address to the local webpage service.

In some embodiments, the device further includes:

a second redirecting module configured to, when the firewall detectsthat a source address of the response message is the local IP addressand the local port number, redirect the response message to the webpage;

wherein both of the local IP address and the local port number point tothe local web service.

In some embodiments, the second redirecting module is configured tochange the source address of the response message to the designatedaccess address according to the address filtering rule of the firewall;and forward the response message with the changed source address to thewebpage.

In the device provided by the embodiment of the present disclosure, whenan access request sent by a webpage to a preset domain name is received,the preset domain name is resolved into a designated access address thathas not been occupied. The access request with a destination addressbeing the designated access address is redirected by a firewall to alocal web service which may interact with the operating system of theterminal. Then, the interaction with the operating system of theterminal is performed by the local web service. Such informationinteraction process can avoid the limitation of the interaction functionbetween the browser or the browser kernel and the operating system,enable interaction between the developed function of the webpage and theoperation system through a generic browser or software based on thebrowser kernel, which can lower the developing cost and have a wideapplicability.

With regard to the device in the above embodiments, the specific mannerin which the respective modules perform the operations has beendescribed in detail in the embodiment relating to the method, and willnot be explained in detail herein.

FIG. 3B is a block diagram of a device for information interactionaccording to some embodiments. As shown in FIG. 3B, the device includesa domain-name resolving module 301B and a sending module 302B.

The domain-name resolving module 301B is connected to the sending module302B, and configured to, when receiving an access request sent by awebpage to a preset domain name, resolve the preset domain name into adesignated access address, the access request being sent by the webpagewhen the webpage is required to interact with an operating system of aterminal, and the designated access address being an access address thathas not been occupied. The sending module 302B is configured to send theaccess request to the designated access address as the destinationaddress, wherein the access request is subject to address filteringdetection by a firewall, and the firewall is configured to: when thefirewall detects that the destination address of the access request isthe designated access address, redirect the access request to a localweb service for information interaction with the operating system of theterminal, respond to the access request and return a response message.

In some embodiments, the domain-name resolving module is configured toinvoke a domain name resolution interface of the operating system of theterminal, the domain name resolution interface having a domain namefiltering function; and

resolve the preset domain name into the designated access address basedon the domain name filtering function.

In the device provided by the embodiment of the present disclosure, whenan access request sent by a webpage to a preset domain name is received,the preset domain name is resolved into a designated access address thathas not been occupied. The designated access address may be redirectedby a firewall to a local web service that may interact with theoperating system of the terminal. Then, the interaction with theoperating system of the terminal is performed by the local web service,and a response message is returned. Such information interaction processcan avoid the limitation of the interaction function between the browseror the browser kernel and the operating system, enable interactionbetween the developed function of the webpage and the operation systemthrough a generic browser or software based on the browser kernel, whichcan lower the developing cost and have a wide applicability.

FIG. 4 is a block diagram of a device 400 for information interactionaccording to some embodiments. For example, the device 400 may be amobile phone, a computer, a digital broadcast terminal, a messagingdevice, a gaming console, a tablet, a medical device, exerciseequipment, a personal digital assistant, and the like.

As shown in FIG. 4, the device 400 may include one or more of thefollowing components: a processing component 402, a memory 404, a powercomponent 406, a multimedia component 408, an audio component 410, aninput/output (I/O) interface 412, a sensor component 414, and acommunication component 416.

The processing component 402 typically controls overall operations ofthe device 400, such as the operations associated with display,telephone calls, data communications, camera operations, and recordingoperations. The processing component 402 may include one or moreprocessors 420 to execute instructions, to perform all or part of thesteps of the above method. Moreover, the processing component 402 mayinclude one or more modules which facilitate the interaction between theprocessing component 402 and other components. For instance, theprocessing component 402 may include a multimedia module to facilitatethe interaction between the multimedia component 408 and the processingcomponent 402.

The memory 404 is configured to store various types of data to supportthe operation of the device 400. Examples of such data includeinstructions for any applications or methods operated on the device 400,contact data, phonebook data, messages, pictures, video, etc. The memory404 may be implemented using any type of volatile or non-volatile memorydevices, or a combination thereof, such as a static random-access memory(SRAM), an electrically erasable programmable read-only memory (EEPROM),an erasable programmable read-only memory (EPROM), a programmableread-only memory (PROM), a read-only memory (ROM), a magnetic memory, aflash memory, a magnetic or optical disk.

The power component 406 provides power to various components of thedevice 400. The power component 406 may include a power managementsystem, one or more power sources, and any other components associatedwith the generation, management, and distribution of power in the device400.

The multimedia component 408 includes a screen providing an outputinterface between the device 400 and the user. In some embodiments, thescreen may include a liquid crystal display (LCD), a light-emittingdiode (LED) display, an organic LED (OLED) display, and a touch panel(TP). The screen can display the content of a webpage to a user, forexample.

If the screen includes the touch panel, the screen may be implemented asa touch screen to receive input signals from the user. The touch panelincludes one or more touch sensors to sense touches, swipes, andgestures on the touch panel. The touch sensors may not only sense aboundary of a touch or swipe action, but also sense a period of time anda pressure associated with the touch or swipe action. In someembodiments, the multimedia component 408 includes a front camera and/ora rear camera. The front camera and the rear camera may receive anexternal multimedia datum while the device 400 is in an operation mode,such as a photographing mode or a video mode. Each of the front cameraand the rear camera may be a fixed optical lens system or have focus andoptical zoom capability.

The audio component 410 is configured to output and/or input audiosignals. For example, the audio component 410 includes a microphone(“MIC”) configured to receive an external audio signal when the device400 is in an operation mode, such as a call mode, a recording mode, anda voice recognition mode. The received audio signal may be furtherstored in the memory 404 or transmitted via the communication component416. In some embodiments, the audio component 410 further includes aspeaker to output audio signals.

The I/O interface 412 provides an interface between the processingcomponent 402 and peripheral interface modules, such as a keyboard, aclick wheel, buttons, and the like. The buttons may include, but are notlimited to, a home button, a volume button, a starting button, and alocking button.

The sensor component 414 includes one or more sensors to provide statusassessments of various aspects of the device 400. For instance, thesensor component 414 may detect an open/closed status of the device 400,relative positioning of components, e.g., the display and the keypad, ofthe device 400, a change in position of the device 400 or a component ofthe device 400, a presence or absence of user contact with the device400, an orientation or an acceleration/deceleration of the device 400,and a change in temperature of the device 400. The sensor component 414may include a proximity sensor configured to detect the presence ofnearby objects without any physical contact. The sensor component 414may also include a light sensor, such as a CMOS or CCD image sensor, foruse in imaging applications. In some embodiments, the sensor component414 may also include an accelerometer sensor, a gyroscope sensor, amagnetic sensor, a pressure sensor, or a temperature sensor.

The communication component 416 is configured to facilitatecommunication, wired or wirelessly, between the device 400 and otherdevices. The device 400 can access a wireless network based on acommunication standard, such as WiFi, 2G, or 3G, or a combinationthereof. In one exemplary embodiment, the communication component 416receives a broadcast signal or broadcast associated information from anexternal broadcast management system via a broadcast channel. In someembodiments, the communication component 416 further includes a nearfield communication (NFC) module to facilitate short-rangecommunications. For example, the NFC module may be implemented based ona radio frequency identification (RFID) technology, an infrared dataassociation (IrDA) technology, an ultra-wideband (UWB) technology, aBluetooth (BT) technology, and other technologies.

In some embodiments, the device 400 may be implemented with one or moreapplication specific integrated circuits (ASICs), digital signalprocessors (DSPs), digital signal processing devices (DSPDs),programmable logic devices (PLDs), field programmable gate arrays(FPGAs), controllers, micro-controllers, microprocessors, or otherelectronic components, to perform the above method for informationinteraction.

In another aspect, a mobile terminal is provided including the devicedescribed above, and further including a microphone and a speaker.

In some embodiments, the mobile terminal is a mobile phone.

In some embodiments, the processor is a general-purpose processor, suchas central processing unit (CPU) of the mobile phone, which isconfigured to not only realize the methods described above but also runprograms or applications (Apps) on the mobile phone, such as browsing,gaming, video/textual/voice communications, etc.

In some other embodiments, the processor is an ASIC described above.

In some embodiments, there is also provided a non-transitorycomputer-readable storage medium including instructions, such asincluded in the memory 404, executable by the processor 420 in thedevice 400 to perform the above method. For example, the non-transitorycomputer-readable storage medium may be a ROM, a RAM, a CD-ROM, amagnetic tape, a floppy disc, an optical data storage device, and thelike.

In some embodiments, there is also provided a computer readable storagemedium, instructions are stored in the storage medium, and when theinstructions in the storage medium are executed by a processor of theterminal, the terminal is caused to perform the above method forinformation interaction.

At least some of the embodiments of the present disclosure can have oneor more of the following advantages: when an access request sent by awebpage to a preset domain name is received, the preset domain name isresolved into a designated access address that has not been occupied.The access request with a destination address being the designatedaccess address is redirected by a firewall to a local web service whichmay interact with the operating system of the terminal. Then, theinteraction with the operating system of the terminal is performed bythe local web service. Such information interaction process can avoidthe limitation of the interaction function between the browser or thebrowser kernel and the operating system, enable interaction between thedeveloped function of the webpage and the operation system through ageneric browser or software based on the browser kernel, which can lowerthe developing cost and have a wide applicability.

In the present disclosure, it is to be understood that the terms“lower,” “upper,” “center,” “longitudinal,” “transverse,” “length,”“width,” “thickness,” “upper,” “lower,” “front,” “back,” “left,”“right,” “vertical,” “horizontal,” “top,” “bottom,” “inside,” “outside,”“clockwise,” “counterclockwise,” “axial,” “radial,” “circumferential,”“column,” “row,” and other orientation or positional relationships arebased on example orientations illustrated in the drawings, and aremerely for the convenience of the description of some embodiments,rather than indicating or implying the device or component beingconstructed and operated in a particular orientation. Therefore, theseterms are not to be construed as limiting the scope of the presentdisclosure.

Moreover, the terms “first” and “second” are used for descriptivepurposes only and are not to be construed as indicating or implying arelative importance or implicitly indicating the number of technicalfeatures indicated. Thus, elements referred to as “first” and “second”may include one or more of the features either explicitly or implicitly.In the description of the present disclosure, “a plurality” indicatestwo or more unless specifically defined otherwise.

In the present disclosure, the terms “installed,” “connected,”“coupled,” “fixed” and the like shall be understood broadly, and may beeither a fixed connection or a detachable connection, or integrated,unless otherwise explicitly defined. These terms can refer to mechanicalor electrical connections, or both. Such connections can be directconnections or indirect connections through an intermediate medium.These terms can also refer to the internal connections or theinteractions between elements. The specific meanings of the above termsin the present disclosure can be understood by those of ordinary skillin the art on a case-by-case basis.

In the present disclosure, a first element being “on,” “over,” or“below” a second element may indicate direct contact between the firstand second elements, without contact, or indirect through anintermediate medium, unless otherwise explicitly stated and defined.

Moreover, a first element being “above,” “over,” or “at an upper surfaceof” a second element may indicate that the first element is directlyabove the second element, or merely that the first element is at a levelhigher than the second element. The first element “below,” “underneath,”or “at a lower surface of” the second element may indicate that thefirst element is directly below the second element, or merely that thefirst element is at a level lower than the second feature. The first andsecond elements may or may not be in contact with each other.

In the description of the present disclosure, the terms “oneembodiment,” “some embodiments,” “example,” “specific example,” or “someexamples,” and the like may indicate a specific feature described inconnection with the embodiment or example, a structure, a material orfeature included in at least one embodiment or example. In the presentdisclosure, the schematic representation of the above terms is notnecessarily directed to the same embodiment or example.

Moreover, the particular features, structures, materials, orcharacteristics described may be combined in a suitable manner in anyone or more embodiments or examples. In addition, various embodiments orexamples described in the specification, as well as features of variousembodiments or examples, may be combined and reorganized.

In some embodiments, the control and/or interface software or app can beprovided in a form of a non-transitory computer-readable storage mediumhaving instructions stored thereon is further provided. For example, thenon-transitory computer-readable storage medium may be a Read-OnlyMemory (ROM), a Random-Access Memory (RAM), a Compact Disc Read-OnlyMemory (CD-ROM), a magnetic tape, a floppy disk, optical data storageequipment, a flash drive such as a USB drive or an SD card, and thelike.

Implementations of the subject matter and the operations described inthis disclosure can be implemented in digital electronic circuitry, orin computer software, firmware, or hardware, including the structuresdisclosed herein and their structural equivalents, or in combinations ofone or more of them. Implementations of the subject matter described inthis disclosure can be implemented as one or more computer programs,i.e., one or more modules of computer program instructions, encoded onone or more computer storage medium for execution by, or to control theoperation of, data processing apparatus.

Alternatively, or in addition, the program instructions can be encodedon an artificially-generated propagated signal, e.g., amachine-generated electrical, optical, or electromagnetic signal, thatis generated to encode information for transmission to suitable receiverapparatus for execution by a data processing apparatus. A computerstorage medium can be, or be included in, a computer-readable storagedevice, a computer-readable storage substrate, a random or serial accessmemory array or device, or a combination of one or more of them.

Moreover, while a computer storage medium is not a propagated signal, acomputer storage medium can be a source or destination of computerprogram instructions encoded in an artificially-generated propagatedsignal. The computer storage medium can also be, or be included in, oneor more separate components or media (e.g., multiple CDs, disks, drives,or other storage devices). Accordingly, the computer storage medium maybe tangible.

The operations described in this disclosure can be implemented asoperations performed by a data processing apparatus on data stored onone or more computer-readable storage devices or received from othersources.

The devices in this disclosure can include special purpose logiccircuitry, e.g., an FPGA (field-programmable gate array), or an ASIC(application-specific integrated circuit). The device can also include,in addition to hardware, code that creates an execution environment forthe computer program in question, e.g., code that constitutes processorfirmware, a protocol stack, a database management system, an operatingsystem, a cross-platform runtime environment, a virtual machine, or acombination of one or more of them. The devices and executionenvironment can realize various different computing modelinfrastructures, such as web services, distributed computing, and gridcomputing infrastructures. For example, the devices can be controlledremotely through the Internet, on a smart phone, a tablet computer orother types of computers, with a web-based graphic user interface (GUI).

A computer program (also known as a program, software, softwareapplication, app, script, or code) can be written in any form ofprogramming language, including compiled or interpreted languages,declarative or procedural languages, and it can be deployed in any form,including as a stand-alone program or as a module, component,subroutine, object, or other unit suitable for use in a computingenvironment. A computer program may, but need not, correspond to a filein a file system. A program can be stored in a portion of a file thatholds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub-programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this disclosure can beperformed by one or more programmable processors executing one or morecomputer programs to perform actions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA, or an ASIC.

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read-only memory, ora random-access memory, or both. Elements of a computer can include aprocessor configured to perform actions in accordance with instructionsand one or more memory devices for storing instructions and data.

Generally, a computer will also include, or be operatively coupled toreceive data from or transfer data to, or both, one or more mass storagedevices for storing data, e.g., magnetic, magneto-optical disks, oroptical disks. However, a computer need not have such devices. Moreover,a computer can be embedded in another device, e.g., a mobile telephone,a personal digital assistant (PDA), a mobile audio or video player, agame console, a Global Positioning System (GPS) receiver, or a portablestorage device (e.g., a universal serial bus (USB) flash drive), to namejust a few.

Devices suitable for storing computer program instructions and datainclude all forms of non-volatile memory, media and memory devices,including by way of example semiconductor memory devices, e.g., EPROM,EEPROM, and flash memory devices; magnetic disks, e.g., internal harddisks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROMdisks. The processor and the memory can be supplemented by, orincorporated in, special purpose logic circuitry.

To provide for interaction with a user, implementations of the subjectmatter described in this specification can be implemented with acomputer and/or a display device, e.g., a VR/AR device, a head-mountdisplay (HMD) device, a head-up display (HUD) device, smart eyewear(e.g., glasses), a CRT (cathode-ray tube), LCD (liquid-crystal display),OLED (organic light emitting diode), TFT (thin-film transistor), plasma,other flexible configuration, or any other monitor for displayinginformation to the user and a keyboard, a pointing device, e.g., amouse, trackball, etc., or a touch screen, touch pad, etc., by which theuser can provide input to the computer.

Other types of devices can be used to provide for interaction with auser as well; for example, feedback provided to the user can be any formof sensory feedback, e.g., visual feedback, auditory feedback, ortactile feedback; and input from the user can be received in any form,including acoustic, speech, or tactile input.

Implementations of the subject matter described in this specificationcan be implemented in a computing system that includes a back-endcomponent, e.g., as a data server, or that includes a middlewarecomponent, e.g., an application server, or that includes a front-endcomponent, e.g., a client computer having a graphical user interface ora Web browser through which a user can interact with an implementationof the subject matter described in this specification, or anycombination of one or more such back-end, middleware, or front-endcomponents. The components of the system can be interconnected by anyform or medium of digital data communication, e.g., a communicationnetwork. Examples of communication networks include a local area network(“LAN”) and a wide area network (“WAN”), an inter-network (e.g., theInternet), and peer-to-peer networks (e.g., ad hoc peer-to-peernetworks).

The features disclosed herein may be implemented as part of a smart homeor a smart office design, which may implement individually or integrallyvarious electronic devices in a home or office. For example, control ordisplay functions described above may be realized on a smart television(or connected television, hybrid television, etc.), which may include aprocessing circuit configured to integrate Internet connectivity withmore traditional television programming sources (e.g., received viacable, satellite, over-the-air, or other signals). The smart televisionmay be physically incorporated into a television set or may include aseparate device such as a set-top box, Blu-ray or other digital mediaplayer, game console, hotel television system, and other companiondevices. A smart television may be configured to allow viewers to searchand find videos, movies, photos and other content on the web, on a localcable TV channel, on a satellite TV channel, or stored on a local harddrive.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of any claims,but rather as descriptions of features specific to particularimplementations. Certain features that are described in thisspecification in the context of separate implementations can also beimplemented in combination in a single implementation. Conversely,various features that are described in the context of a singleimplementation can also be implemented in multiple implementationsseparately or in any suitable subcombination.

Moreover, although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various systemcomponents in the implementations described above should not beunderstood as requiring such separation in all implementations, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Thus, particular implementations of the subject matter have beendescribed. Other implementations are within the scope of the followingclaims. In some cases, the actions recited in the claims can beperformed in a different order and still achieve desirable results. Inaddition, the processes depicted in the accompanying figures do notnecessarily require the particular order shown, or sequential order, toachieve desirable results. In certain implementations, multitasking orparallel processing may be utilized.

It is intended that the specification and embodiments be considered asexamples only. Other embodiments of the disclosure will be apparent tothose skilled in the art in view of the specification and drawings ofthe present disclosure. That is, although specific embodiments have beendescribed above in detail, the description is merely for purposes ofillustration. It should be appreciated, therefore, that many aspectsdescribed above are not intended as required or essential elementsunless explicitly stated otherwise.

Various modifications of, and equivalent acts corresponding to, thedisclosed aspects of the example embodiments, in addition to thosedescribed above, can be made by a person of ordinary skill in the art,having the benefit of the present disclosure, without departing from thespirit and scope of the disclosure defined in the following claims, thescope of which is to be accorded the broadest interpretation so as toencompass such modifications and equivalent structures.

The invention claimed is:
 1. A method for information interaction,comprising: when an access request sent by a webpage to a preset domainname is received by a browser component, resolving the preset domainname into a designated access address, the access request being sent bythe webpage when the webpage is required to interact with an operatingsystem of a terminal, and the designated access address being an accessaddress that has not been occupied; sending the access request to thedesignated access address as a destination address; when a firewalldetects that the destination address of the access request is thedesignated access address, redirecting the access request to a local webservice, the local web service being configured for informationinteraction with the operating system of the terminal; responding to theaccess request and returning a response message based on the informationinteraction between the local web service and the operating system ofthe terminal; and when the firewall detects that a source address of theresponse message is a local IP address and a local port number,redirecting the response message to the webpage, wherein both of thelocal IP address and the local port number point to the local webservice.
 2. The method according to claim 1, wherein said resolving thepreset domain name into the designated access address comprises:invoking a domain name resolution interface of the operating system ofthe terminal by the browser component, the domain name resolutioninterface having a domain name filtering function; and resolving thepreset domain name into the designated access address based on thedomain name filtering function.
 3. The method according to claim 1,wherein said redirecting the access request to the local web servicecomprises: converting the destination address of the access request intothe local IP address and the local port number according to an addressfiltering rule of the firewall, wherein both of the local IP address andthe local port number point to the local web service; and forwarding theaccess request with the converted destination address to the local webservice.
 4. The method according to claim 1, wherein said redirectingthe response message to the webpage comprises: changing the sourceaddress of the response message to the designated access addressaccording to an address filtering rule of the firewall; and forwardingthe response message with the changed source address to the webpage. 5.A device for information interaction, comprising: a processor; andmemory for storing instructions executable by the processor, wherein theprocessor is configured to perform the method according to claim
 1. 6.The device according to claim 5, wherein the processor is furtherconfigured to invoke a domain name resolution interface of the operatingsystem of the terminal by the browser component, the domain nameresolution interface having a domain name filtering function; andresolve the preset domain name into the designated access address basedon the domain name filtering function.
 7. The device according to claim5, wherein the processor is further configured to convert thedestination address of the access request into the local IP address andthe local port number according to an address filtering rule of thefirewall, the local IP address and the local port number pointing to thelocal web service; and forward the access request with the converteddestination address to the local web service.
 8. The device according toclaim 5, wherein the processor is further configured to change thesource address of the response message to the designated access addressaccording to an address filtering rule of the firewall; and forward theresponse message with the changed source address to the webpage.
 9. Amethod for information interaction, which is applied in a browsercomponent, the method comprising: when receiving an access request sentby a webpage to a preset domain name, resolving the preset domain nameinto a designated access address, the access request being sent by thewebpage when the webpage is required to interact with an operatingsystem of a terminal, and the designated access address being an accessaddress that has not been occupied; sending the access request with thedesignated access address as a destination address, wherein the accessrequest is subject to address filtering detection by a firewall, and thefirewall is configured to: when the firewall detects that thedestination address of the access request is the designated accessaddress, redirect the access request to a local web service forinformation interaction with the operating system of the terminal,respond to the access request and return a response message; and whenthe firewall detects that a source address of the response message is alocal IP address and a local port number, redirecting the responsemessage to the webpage, wherein both of the local IP address and thelocal port number point to the local web service.
 10. The methodaccording to claim 9, wherein said resolving the preset domain name intothe designated access address comprises: invoking a domain nameresolution interface of the operating system of the terminal, the domainname resolution interface having a domain name filtering function; andresolving the preset domain name into the designated access addressbased on the domain name filtering function.
 11. A device forinformation interaction, comprising: a processor; and memory for storinginstructions executable by the processor, wherein the processor isconfigured to perform the method according to claim
 9. 12. The deviceaccording to claim 11, wherein the processor is further configured to:invoke a domain name resolution interface of the operating system of theterminal, the domain name resolution interface having a domain namefiltering function; and resolve the preset domain name into thedesignated access address based on the domain name filtering function.13. A mobile terminal comprising the device according to claim 11,further comprising a microphone and a speaker.
 14. The mobile terminalaccording to claim 13, wherein the mobile terminal is a mobile phone,and the processor is a central processing unit (CPU) of the mobilephone.
 15. A non-transitory computer-readable storage medium havingstored thereon instructions that, when being executed by a processor,cause the processor to: when receiving an access request sent by awebpage to a preset domain name, resolve the preset domain name into adesignated access address, the access request being sent by the webpagewhen the webpage is required to interact with an operating system of aterminal, and the designated access address being an access address thathas not been occupied; and send the access request with the designatedaccess address as a destination address, wherein the access request issubject to address filtering detection by a firewall, and the firewallis configured to: when the firewall detects that the destination addressof the access request is the designated access address, redirect theaccess request to a local web service for information interaction withthe operating system of the terminal, respond to the access request, andreturn a response message; and when the firewall detects that a sourceaddress of the response message is a local IP address and a local portnumber, redirect the response message to the webpage, wherein both ofthe local IP address and the local port number point to the local webservice.
 16. The non-transitory computer-readable storage mediumaccording to claim 15, wherein the processor is further configured to:invoke a domain name resolution interface of the operating system of theterminal, the domain name resolution interface having a domain namefiltering function; and resolve the preset domain name into thedesignated access address based on the domain name filtering function.